let fs = require("fs")
let jsondata;


//1.first confirm is it exist, if not, create it ,and init it with {}
    if (!fs.existsSync("./request_process/code_message.json")) {
        fs.writeFileSync("./request_process/code_message.json", "{}", {encoding: "utf8", flag: "w"})
    }
        //flag 'w' means overwrite it with {}
    jsondata=JSON.parse(fs.readFileSync("./request_process/code_message.json", {encoding: "utf8", flag: "r"}))
module.exports=jsondata